import os, sys;

test_topologies = ('100-n-1-2', '100-n-1-3', '100-n-2-2', '100-n-2-3', '100-n-3-2', '100-n-3-3', '100-n-4-2', '100-n-4-3', '100-1-sq', '100-1-sq-broken-10-1', '100-1-sq-broken-21-1');
#test_topologies = ('100-n-2-1', '100-n-3-1', '100-n-4-1', '200-n-1', '50-n-1');

test_tc = ('1', '2', '3', '4', '5', '6', '7', '8', '9');
test_treesenabled = ('1', '2', '3');

f_output = open("analysis_allpair.txt", "a");
f_output.flush();

for top in test_topologies:
	N = int(top.split('-')[0]);
	for tc in test_tc:
		for t in test_treesenabled:
			common_dirname = "allpair_route-"+top+"/tc"+tc+"/t"+t+"/s0";
			print(common_dirname);

			os.system("nice ~/analyze.exe "+common_dirname+" "+str(N));               
			f = open("/home/DBGROUP/svilen/results"+common_dirname+"/routestats.txt", "r");
			l = f.readlines();
			f.close();

			f_output.writelines(l);
			f_output.flush();

f_output.close();
